package net.huashitong.taskGroup.dao;

import com.sirdc.modules.core.dao.GenericQuery;
import com.sirdc.modules.core.dao.StringDao;
import net.huashitong.taskGroup.entity.DeptList;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public class DeptListDao extends StringDao<DeptList> {

    public DeptList getDeptByCode(String code)
    {
        GenericQuery query =createQuery("t");
        query.append(" and t.deptCode=:deptCode").setParam("deptCode",code);
        return query.singleResult();
    }
}
